package com.igeek.d0607;

import java.io.InputStream;
import java.util.Properties;

/**
 * @Author: zhiyu
 * @Date:18:57
 * @DESC:
 */
public class Test4 {
    public static void classLoadByKey(String key){
        try (
                InputStream inputStream = Test4.class.getResourceAsStream("class.properties");
                ){
                Properties properties = new Properties();
                properties.load(inputStream);
            String className = properties.getProperty(key);
            Class.forName(className);
        }catch (Exception e){
                 e.printStackTrace();
             }
        
    }

    public static void main(String[] args) {
        classLoadByKey("demo1");
    }
}
